package com.org.web.support.base;

import com.org.platform.model.ResultModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author duheng
 * @Date 2021/10/30 19:19
 */
@Slf4j
@ControllerAdvice
public class MyExceptionHandler {

	@ExceptionHandler(value = Exception.class)
	public ResultModel exceptionHandler(Exception e) {
		log.error("系统繁忙", e);
		return ResultModel.newFail("系统繁忙");
	}
}
